package work;

// 蜥蜴类
public class Lizard extends ReptileImpl {
    private double length;
    private String skinColor;
    private int age;

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public String getSkinColor() {
        return skinColor;
    }

    public void setSkinColor(String skinColor) {
        this.skinColor = skinColor;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    private int weight;
    public Lizard(String name, double length, String skinColor,int age, int weight, String habitat) {
        super(name);
        this.length = length;
        this.skinColor = skinColor;
        this.habitat = habitat;
        this.weight = weight;
        this.age = age;
    }

    public String getHabitat() {
        return habitat;
    }

    public void setHabitat(String habitat) {
        this.habitat = habitat;
    }

    private String habitat;

    @Override
    public void crawl() {
        System.out.println("蜥蜴正在爬行");
    }

    @Override
    public void displayDetails() {
        super.displayDetails();
        System.out.println(name);
        System.out.println("体重：" + weight + "kg");
        System.out.println("年龄：" + age + "岁");
        System.out.println("长度：" + length + "cm");
        System.out.println("皮肤颜色：" + skinColor);
        System.out.println("栖息地：" + habitat);
        this.crawl();
    }
}

